using System;
using System.Collections.Generic;


namespace Gfw.Models.Stock
{
	[Serializable]
	public partial class StkBargainrecord: IEquatable<StkBargainrecord>
	{

		#region Private Members

		private string _id; 
		private string _userid; 
		private int _accounttype; 
		private DateTime? _bargaindate; 
		private int _bargaintype; 
		private decimal _agencyprice; 
		private decimal _agencycount; 
		private decimal _actualcount; 
		private decimal _actualprice; 
		private decimal _totalprice; 
		private decimal _totalchange; 
		private string _agencyid; 
		private decimal _taxation; 
		private decimal _income; 
		private string _awardserialno; 		
		#endregion

		#region Constructor

		public StkBargainrecord()
		{
			_id = String.Empty; 
			_userid = String.Empty; 
			_accounttype = 0; 
			_bargaindate = null; 
			_bargaintype = 0; 
			_agencyprice = 0; 
			_agencycount = 0; 
			_actualcount = 0; 
			_actualprice = 0; 
			_totalprice = 0; 
			_totalchange = 0; 
			_agencyid = String.Empty; 
			_taxation = 0; 
			_income = 0; 
			_awardserialno = String.Empty; 
		}
		#endregion // End of Default ( Empty ) Class Constuctor

		#region Public Properties
			
		public virtual string Id
		{
			get
			{ 
				return _id;
			}

			set	
			{	
				if( value == null )
					throw new ArgumentOutOfRangeException("Null value not allowed for Id", value, "null");
				
				if(  value.Length > 40)
					throw new ArgumentOutOfRangeException("Invalid value for Id", value, value.ToString());
				
				_id = value;
			}
		}
			
		public virtual string Userid
		{
			get
			{ 
				return _userid;
			}

			set	
			{	
				if( value == null )
					throw new ArgumentOutOfRangeException("Null value not allowed for Userid", value, "null");
				
				if(  value.Length > 40)
					throw new ArgumentOutOfRangeException("Invalid value for Userid", value, value.ToString());
				
				_userid = value;
			}
		}
			
		public virtual int AccountType
		{
			get
			{ 
				return _accounttype;
			}
			set
			{
				_accounttype = value;
			}

		}
			
		public virtual DateTime? BargainDate
		{
			get
			{ 
				return _bargaindate;
			}
			set
			{
				if( value == null )
					throw new ArgumentOutOfRangeException("Null value not allowed for BargainDate", value, "null");

				_bargaindate = value;
			}

		}
			
		public virtual int BargainType
		{
			get
			{ 
				return _bargaintype;
			}
			set
			{
				_bargaintype = value;
			}

		}
			
		public virtual decimal AgencyPrice
		{
			get
			{ 
				return _agencyprice;
			}
			set
			{
				_agencyprice = value;
			}

		}
			
		public virtual decimal AgencyCount
		{
			get
			{ 
				return _agencycount;
			}
			set
			{
				_agencycount = value;
			}

		}
			
		public virtual decimal ActualCount
		{
			get
			{ 
				return _actualcount;
			}
			set
			{
				_actualcount = value;
			}

		}
			
		public virtual decimal ActualPrice
		{
			get
			{ 
				return _actualprice;
			}
			set
			{
				_actualprice = value;
			}

		}
			
		public virtual decimal TotalPrice
		{
			get
			{ 
				return _totalprice;
			}
			set
			{
				_totalprice = value;
			}

		}
			
		public virtual decimal TotalChange
		{
			get
			{ 
				return _totalchange;
			}
			set
			{
				_totalchange = value;
			}

		}
			
		public virtual string AgencyId
		{
			get
			{ 
				return _agencyid;
			}

			set	
			{	
				if(  value != null &&  value.Length > 40)
					throw new ArgumentOutOfRangeException("Invalid value for AgencyId", value, value.ToString());
				
				_agencyid = value;
			}
		}
			
		public virtual decimal Taxation
		{
			get
			{ 
				return _taxation;
			}
			set
			{
				_taxation = value;
			}

		}
			
		public virtual decimal Income
		{
			get
			{ 
				return _income;
			}
			set
			{
				_income = value;
			}

		}
			
		public virtual string AwardSerialNo
		{
			get
			{ 
				return _awardserialno;
			}

			set	
			{	
				if(  value != null &&  value.Length > 40)
					throw new ArgumentOutOfRangeException("Invalid value for AwardSerialNo", value, value.ToString());
				
				_awardserialno = value;
			}
		}
			
				
		#endregion 

		#region Public Functions

		#endregion //Public Functions

		#region IEquatable members

		public virtual bool Equals(StkBargainrecord other)
		{
			if (other == this)
				return true;
		
			return ( other != null ) &&
				( this._id == other.Id );
				   
		}

		#endregion
		
	}
}
